<template>
	<view class="uv-steps-box" :style="!logList.length ? 'padding:0;' : ''">
		<uv-empty
			marginTop="100"
			v-if="!logList.length"
			mode="list"
			icon="https://hzybucket.obs.cn-south-1.myhuaweicloud.com/we_chat/no-msg2.png"
			:text="''"
			textColor="rgba(0,0,0,0)"
		></uv-empty>
		<uv-steps direction="column">
			<uv-steps-item v-for="(item, index) in logList" :key="index">
				<template v-slot:icon>
					<view class="uv-steps-box-tips"></view>
				</template>
				<template v-slot:title>
					<view class="steps-box">
						<view class="steps-box-top">
							<view class="time">{{ item.updated_at }}</view>
							<view class="user-data">
								<image class="user-avater" :src="item.handlers_image"></image>
								<view class="user-name">{{ item.handlers_position }}-{{ item.handlers_name }}</view>
							</view>
						</view>
						<view class="steps-box-data">
							<view class="steps-box-data-title">
								{{ `${item.content}${item.state == 500 ? '（管理员回退该记录已废弃）' : ''}` }}
							</view>
							<!-- <view class="steps-box-data-list">
								<image class="steps-box-data-list-image" src="https://hzybucket.obs.cn-south-1.myhuaweicloud.com/we_chat/top-bg.png">
								</image>
							</view> -->

							<!-- 勘场费用信息 -->
							<template v-if="item.log_status == 140">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('kc_type')">
										<view class="table-item-title">收款类型</view>
										<view class="table-item-content">勘场费用</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('kc_receiving_account')">
										<view class="table-item-title">收款账户</view>
										<view class="table-item-content">
											<template>
												{{ item.form_data.receiving_account_name || '--' }}
											</template>
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('kc_amount_collected')">
										<view class="table-item-title">收款金额</view>
										<view class="table-item-content">
											<template>
												{{ item.form_data.amount_collected || '--' }}
											</template>
										</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark || '--' }}</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('kc_voucher_file') && item.form_data.payment_voucher.length">
										<view class="table-item-title">收款凭证</view>
									</view>
									<view class="steps-box-data-list" v-if="fieldShowFunc('kc_voucher_file') && item.form_data.payment_voucher.length">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.payment_voucher"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
								</view>
							</template>
							<!-- 对客日志 -->
							<template v-if="item.log_status == 450">
								<view class="table-content">
									<view class="table-item">
										<view class="table-item-title">进展描述</view>
										<view class="table-item-content">{{ item.remark || '--' }}</view>
									</view>
									<view class="table-item" v-if="item.form_data.log_file.length && fieldShowFunc('log_file')">
										<view class="table-item-title">日志图片</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.log_file.length && fieldShowFunc('log_file')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.log_file"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
								</view>
							</template>
							<!-- 勘场报告 -->
							<template v-if="item.log_status == 170">
								<view class="table-content">
									<view class="table-item" v-if="item.form_data.scene_file.length && fieldShowFunc('scene_file')">
										<view class="table-item-title">现场图片</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.scene_file.length && fieldShowFunc('scene_file')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.scene_file"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="item.form_data.report_file.length && fieldShowFunc('report_file')">
										<view class="table-item-title">勘场报告</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.report_file.length && fieldShowFunc('report_file')">
										<view v-for="(file, fileIndex) in item.form_data.report_file" :key="fileIndex" class="table-item-file-name" @click="preFileFunc(file)">
											{{ file.file_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.video_file.length && fieldShowFunc('video_file')">
										<view class="table-item-title">现场视频</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.video_file.length && fieldShowFunc('video_file')">
										<view @click="preFileFunc(file)" class="steps-box-data-list-image" v-for="(file, fileIndex) in item.form_data.video_file" :key="fileIndex">
											<view class="icon-box">
												<uv-icon name="play-right-fill" size="20" color="#ffffff"></uv-icon>
											</view>
											<video
												class="video"
												:src="file.file_url"
												:controls="false"
												:show-fullscreen-btn="false"
												:show-play-btn="false"
												:show-center-play-btn="false"
											></video>
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.sketch_file.length && fieldShowFunc('sketch_file')">
										<view class="table-item-title">手绘图</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.sketch_file.length && fieldShowFunc('sketch_file')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.sketch_file"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
								</view>
							</template>
							<!-- 上传勘场资料 -->
							<template v-if="item.log_status == 180">
								<view class="table-content">
									<view class="table-item" v-if="item.form_data.survey_data.length && fieldShowFunc('kc_survey_data')">
										<view class="table-item-title">设计文件</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.survey_data[0])">
											{{ item.form_data.survey_data[0].file_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 上传设计图 -->
							<template v-if="item.log_status == 190">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('plan_drawing') || fieldShowFunc('plan_drawing_image')">
										<view class="table-item-title">平面图</view>
										<view v-for="(file, fileIndex) in item.form_data.plan_drawing" :key="fileIndex" class="table-item-file-name" @click="preFileFunc(file)">
											{{ file.file_name }}
										</view>
										<view class="table-item-content" v-if="!item.form_data.plan_drawing.length">--</view>
									</view>
									<view class="steps-box-data-list" v-if="fieldShowFunc('plan_drawing_image')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.plan_drawing_image"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="fieldShowFunc('effect_drawing') || fieldShowFunc('effect_drawing_image')">
										<view class="table-item-title">效果图</view>
										<view v-if="item.form_data.effect_drawing.length" class="table-item-file-name" @click="preFileFunc(item.form_data.effect_drawing[0])">
											{{ item.form_data.effect_drawing[0].file_name }}
										</view>
										<view class="table-item-content" v-else>--</view>
									</view>
									<view class="steps-box-data-list" v-if="fieldShowFunc('effect_drawing_image')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.effect_drawing_image"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="fieldShowFunc('construction_drawing') || fieldShowFunc('construction_drawing_image')">
										<view class="table-item-title">施工图</view>
										<view
											v-if="item.form_data.construction_drawing.length"
											class="table-item-file-name"
											@click="preFileFunc(item.form_data.construction_drawing[0])"
										>
											{{ item.form_data.construction_drawing[0].file_name }}
										</view>
										<view class="table-item-content" v-else>--</view>
									</view>
									<view class="steps-box-data-list" v-if="fieldShowFunc('construction_drawing_image')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.construction_drawing_image"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="fieldShowFunc('other_file') || fieldShowFunc('other_file')">
										<view class="table-item-title">其他文件</view>
										<template v-if="item.form_data.other_file.length">
											<view v-for="(file, fileIndex) in item.form_data.other_file" :key="fileIndex" class="table-item-file-name" @click="preFileFunc(file)">
												{{ file.file_name }}
											</view>
										</template>
										<view class="table-item-content" v-else>--</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 提交报价申请 -->
							<template v-if="item.log_status == 200">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('start_date')">
										<view class="table-item-title">预计开工日期</view>
										<view class="table-item-content">
											{{ item.form_data.start_date || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('end_date')">
										<view class="table-item-title">预计完工日期</view>
										<view class="table-item-content">
											{{ item.form_data.end_date || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('duration_days')">
										<view class="table-item-title">预计工期</view>
										<view class="table-item-content">
											{{ item.form_data.expect_duration_days ? item.form_data.expect_duration_days + '天' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 造价单 -->
							<template v-if="item.log_status == 220">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('start_date')">
										<view class="table-item-title">预计开工日期</view>
										<view class="table-item-content">
											{{ item.form_data.start_date || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('end_date')">
										<view class="table-item-title">预计完工日期</view>
										<view class="table-item-content">
											{{ item.form_data.end_date || '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('duration_days')">
										<view class="table-item-title">工期天数</view>
										<view class="table-item-content">
											{{ item.form_data.duration_days ? item.form_data.duration_days + '天' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('building_area')">
										<view class="table-item-title">建筑面积</view>
										<view class="table-item-content">
											{{ item.form_data.building_area ? item.form_data.building_area + 'm²' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('quotation_amount')">
										<view class="table-item-title">报价金额</view>
										<view class="table-item-content">
											{{ item.form_data.quotation_amount ? item.form_data.quotation_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('basic_decoration_fee')">
										<view class="table-item-title">基础装修费</view>
										<view class="table-item-content">
											{{ item.form_data.basic_decoration_fee ? item.form_data.basic_decoration_fee + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('material_costs')">
										<view class="table-item-title">主材采购费</view>
										<view class="table-item-content">
											{{ item.form_data.material_costs ? item.form_data.material_costs + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('quotation_taxes')">
										<view class="table-item-title">报价税金</view>
										<view class="table-item-content">
											{{ item.form_data.quotation_taxes ? item.form_data.quotation_taxes + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('cost_amount')">
										<view class="table-item-title">成本金额</view>
										<view class="table-item-content">
											{{ item.form_data.cost_amount ? item.form_data.cost_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('procurement_cost')">
										<view class="table-item-title">现场采购成本</view>
										<view class="table-item-content">
											{{ item.form_data.procurement_cost ? item.form_data.procurement_cost + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('centralized_procurement_cost')">
										<view class="table-item-title">公司采集成本</view>
										<view class="table-item-content">
											{{ item.form_data.centralized_procurement_cost ? item.form_data.centralized_procurement_cost + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('management_costs')">
										<view class="table-item-title">管理成本</view>
										<view class="table-item-content">
											{{ item.form_data.management_costs ? item.form_data.management_costs + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('profit_amount')">
										<view class="table-item-title">利润金额</view>
										<view class="table-item-content">
											{{ item.form_data.profit_amount ? item.form_data.profit_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('bj_profit_amount')">
										<view class="table-item-title">利润率(报价)</view>
										<view class="table-item-content">
											{{ item.form_data.profit_ratio ? item.form_data.profit_ratio + '%' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('bj_quotation_type')">
										<view class="table-item-title">报价类型</view>
										<view class="table-item-content">
											<template v-if="item.form_data.quotation_type == 1">基础施工报价（首次）</template>
											<template v-if="item.form_data.quotation_type == 2">基础施工报价（调整）</template>
											<template v-if="item.form_data.quotation_type == 3">增减项施工报价</template>
										</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
									<view class="table-item" v-if="item.form_data.quotation_file.length && fieldShowFunc('quotation_file')">
										<view class="table-item-title">报价单文件</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.quotation_file[0])">
											{{ item.form_data.quotation_file[0].file_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.profit_statement_file.length && fieldShowFunc('profit_statement_file')">
										<view class="table-item-title">利润单文件</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.profit_statement_file[0])">
											{{ item.form_data.profit_statement_file[0].file_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.cost_list_file.length && fieldShowFunc('cost_list_file')">
										<view class="table-item-title">成本单文件</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.cost_list_file[0])">
											{{ item.form_data.cost_list_file[0].file_name }}
										</view>
									</view>
								</view>
							</template>
							<!-- 只显示描述的 -->
							<template
								v-if="
									item.log_status == 230 ||
									item.log_status == 240 ||
									item.log_status == 165 ||
									item.log_status == 160 ||
									item.log_status == 150 ||
									item.log_status == 210 ||
									item.log_status == 260 ||
									item.log_status == 270 ||
									item.log_status == 300 ||
									item.log_status == 340 ||
									item.log_status == 330 ||
									item.log_status == 440 ||
									item.log_status == 360 ||
									item.log_status == 370 ||
									item.log_status == 390 ||
									item.log_status == 400 ||
									item.log_status == 420 ||
									item.log_status == 415
								"
							>
								<view class="table-content">
									<view class="table-item" v-if="item.form_data.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.form_data.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 对客报价 -->
							<template v-if="item.log_status == 250">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('quotation_amount')">
										<view class="table-item-title">报价金额</view>
										<view class="table-item-content">
											{{ item.form_data.old_amount ? item.form_data.old_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('bj_new_amount')">
										<view class="table-item-title">预计签约金额</view>
										<view class="table-item-content">
											{{ item.form_data.new_amount ? item.form_data.new_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('bj_discount_amount')">
										<view class="table-item-title">优惠金额</view>
										<view class="table-item-content">
											{{ item.form_data.discount_amount ? item.form_data.discount_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 合同信息 -->
							<template v-if="item.log_status == 280">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('account_name')">
										<view class="table-item-title">签约主体</view>
										<view class="table-item-content">
											{{ item.form_data.signing_company_name || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('system_quotation')">
										<view class="table-item-title">最终报价金额</view>
										<view class="table-item-content">
											{{ item.form_data.quotation_amount ? item.form_data.quotation_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('contract_price')">
										<view class="table-item-title">合同签约金额</view>
										<view class="table-item-content">
											{{ item.form_data.contract_price ? item.form_data.contract_price + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('contract_quotation_ratio')">
										<view class="table-item-title">签约报价比</view>
										<view class="table-item-content">
											{{ item.form_data.contract_quotation_ratio ? item.form_data.contract_quotation_ratio + '%' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('contract_duration_days')">
										<view class="table-item-title">工期</view>
										<view class="table-item-content">
											{{ item.form_data.duration_days ? item.form_data.duration_days + '天' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('contract_commencement_date')">
										<view class="table-item-title">合同开工日期</view>
										<view class="table-item-content">
											{{ item.form_data.contract_commencement_date }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('contract_completion_date')">
										<view class="table-item-title">合同完工日期</view>
										<view class="table-item-content">
											{{ item.form_data.contract_completion_date }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('signing_date')">
										<view class="table-item-title">签约日期</view>
										<view class="table-item-content">
											{{ item.form_data.signing_date }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.contract_file.length && fieldShowFunc('contract_files')">
										<view class="table-item-title">合同附件</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.contract_file[0])">
											{{ item.form_data.contract_file[0].file_name }}
										</view>
									</view>

									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 预付款凭证 -->
							<template v-if="item.log_status == 290">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('amount_collected')">
										<view class="table-item-title">预付款金额</view>
										<view class="table-item-content">
											{{ item.form_data.amount_collected ? item.form_data.amount_collected + '元' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('receiving_account')">
										<view class="table-item-title">收款账户</view>
										<view class="table-item-content">
											{{ item.form_data.receiving_account_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.payment_voucher.length && fieldShowFunc('voucher_file')">
										<view class="table-item-title">预付款凭证</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.payment_voucher.length && fieldShowFunc('voucher_file')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.payment_voucher"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 确认施工 -->
							<template v-if="item.log_status == 310">
								<view class="table-content">
									<view class="table-item width-50" v-if="fieldShowFunc('start_date')">
										<view class="table-item-title">开工日期</view>
										<view class="table-item-content">
											{{ item.form_data.start_date }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('foreman_name')">
										<view class="table-item-title">工长</view>
										<view class="table-item-content">
											{{ item.form_data.foreman_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.start_file.length && fieldShowFunc('start_file')">
										<view class="table-item-title">开工图片</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.start_file.length && fieldShowFunc('start_file')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.start_file"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 施工记录 -->
							<template v-if="item.log_status == 480">
								<view class="table-content">
									<view class="table-item width-50" v-if="fieldShowFunc('sg_construction_progress')">
										<view class="table-item-title">施工进度</view>
										<view class="table-item-content">
											<template v-if="item.form_data.construction_progress == 10">待进场</template>
											<template v-if="item.form_data.construction_progress == 20">施工中</template>
											<template v-if="item.form_data.construction_progress == 30">一次预警</template>
											<template v-if="item.form_data.construction_progress == 40">二次预警</template>
											<template v-if="item.form_data.construction_progress == 50">已超期</template>
											<template v-if="item.form_data.construction_progress == 60">停工中</template>
											<template v-if="item.form_data.construction_progress == 70">已完工</template>
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('is_overdue')">
										<view class="table-item-title">是否超期</view>
										<view class="table-item-content">
											{{ item.form_data.is_overdue == 1 ? '是' : '否' }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.is_overdue == 1 && fieldShowFunc('sg_overdue_type')">
										<view class="table-item-title">超期类型</view>
										<view class="table-item-content">
											<template v-if="item.form_data.overdue_type == 1">客户原因</template>
											<template v-if="item.form_data.overdue_type == 2">供应商原因</template>
											<template v-if="item.form_data.overdue_type == 3">物业原因</template>
											<template v-if="item.form_data.overdue_type == 4">城管审批</template>
											<template v-if="item.form_data.overdue_type == 5">不可抗力</template>
											<template v-if="item.form_data.overdue_type == 6">现场管理</template>
											<template v-if="item.form_data.overdue_type == 7">图纸变更</template>
											<template v-if="item.form_data.overdue_type == 8">其他原因</template>
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.is_overdue == 1 && fieldShowFunc('sg_reason_overdue')">
										<view class="table-item-title">超期原因</view>
										<view class="table-item-content">
											{{ item.form_data.reason_overdue || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.construction_stage && fieldShowFunc('construction_stage')">
										<view class="table-item-title">施工阶段</view>
										<view class="table-item-content">
											{{ item.form_data.construction_stage || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.content && fieldShowFunc('sg_content')">
										<view class="table-item-title">施工内容</view>
										<view class="table-item-content">
											{{ item.form_data.content || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.remark && fieldShowFunc('sg_remark')">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
									<view class="table-item" v-if="item.form_data.log_file.length && fieldShowFunc('sg_log_file')">
										<view class="table-item-title">日志文件</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.log_file[0])">
											{{ item.form_data.log_file[0].file_name }}
										</view>
									</view>
								</view>
							</template>
							<!-- 节点验收 -->
							<template v-if="item.log_status == 320 && fieldShowFunc('project_nodes')">
								<view class="table-content">
									<view class="table-item" v-for="(child, childIndex) in item.form_data.nodes" :key="childIndex">
										<view class="table-item-title">{{ child.name }}</view>
										<!-- 图片视频 -->
										<template v-if="child.file.length">
											<view class="steps-box-data-list" style="margin-top: 20rpx">
												<block v-for="(file, fileIndex) in child.file" :key="fileIndex">
													<!-- 视频 -->
													<view v-if="!isImageUrl(file.file_url)" @click="preFileFunc(file)" class="steps-box-data-list-image">
														<view class="icon-box">
															<uv-icon name="play-right-fill" size="20" color="#ffffff"></uv-icon>
														</view>
														<video
															class="video"
															:src="file.file_url"
															:controls="false"
															:show-fullscreen-btn="false"
															:show-play-btn="false"
															:show-center-play-btn="false"
														></video>
													</view>
													<!-- 图片 -->
													<image v-else @click="preFileFunc(file)" class="steps-box-data-list-image" :src="file.file_url"></image>
												</block>
											</view>
										</template>
										<view v-else class="table-item-content">
											{{ child.content || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 节点进度款提交 -->
							<template v-if="item.log_status == 350">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('amount_collected')">
										<view class="table-item-title">进度款金额</view>
										<view class="table-item-content">
											{{ item.form_data.amount_collected ? item.form_data.amount_collected + '元' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('receiving_account')">
										<view class="table-item-title">收款账户</view>
										<view class="table-item-content">
											{{ item.form_data.receiving_account_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.payment_voucher.length && fieldShowFunc('voucher_file')">
										<view class="table-item-title">进度款凭证</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.payment_voucher.length && fieldShowFunc('voucher_file')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.payment_voucher"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 结算单 -->
							<template v-if="item.log_status == 380">
								<view class="table-content">
									<view class="table-item width-50" v-if="fieldShowFunc('js_contract_price')">
										<view class="table-item-title">合同签约金额</view>
										<view class="table-item-content">
											{{ item.form_data.contract_price ? item.form_data.contract_price + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('changes_amount')">
										<view class="table-item-title">增减项总金额</view>
										<view class="table-item-content">
											{{ item.form_data.changes_amount ? item.form_data.changes_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('settlement_amount')">
										<view class="table-item-title">应结算金额</view>
										<view class="table-item-content">
											{{ item.form_data.settlement_amount ? item.form_data.settlement_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_procurement_cost')">
										<view class="table-item-title">现场采购成本</view>
										<view class="table-item-content">
											{{ item.form_data.procurement_cost ? item.form_data.procurement_cost + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_centralized_procurement_cost')">
										<view class="table-item-title">公司采集成本</view>
										<view class="table-item-content">
											{{ item.form_data.centralized_procurement_cost ? item.form_data.centralized_procurement_cost + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_management_costs')">
										<view class="table-item-title">管理成本</view>
										<view class="table-item-content">
											{{ item.form_data.management_costs ? item.form_data.management_costs + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_profit_amount')">
										<view class="table-item-title">利润金额</view>
										<view class="table-item-content">
											{{ item.form_data.profit_amount ? item.form_data.profit_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_paid_amount')">
										<view class="table-item-title">已付款金额</view>
										<view class="table-item-content">
											{{ item.form_data.paid_amount ? item.form_data.paid_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_unpaid_amount')">
										<view class="table-item-title">待付款金额</view>
										<view class="table-item-content">
											{{ item.form_data.unpaid_amount ? item.form_data.unpaid_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_settlement_taxes')">
										<view class="table-item-title">结算税金</view>
										<view class="table-item-content">
											{{ item.form_data.settlement_taxes ? item.form_data.settlement_taxes + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_settlement_cost_amount')">
										<view class="table-item-title">成本金额</view>
										<view class="table-item-content">
											{{ item.form_data.settlement_cost_amount ? item.form_data.settlement_cost_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('js_settlement_profit_margin')">
										<view class="table-item-title">利润率</view>
										<view class="table-item-content">
											{{ item.form_data.settlement_profit_margin ? item.form_data.settlement_profit_margin + '%' : '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.settlement_file.length && fieldShowFunc('js_settlement_file')">
										<view class="table-item-title">项目结算单</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.settlement_file[0])">
											{{ item.form_data.settlement_file[0].file_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.inventory_file.length && fieldShowFunc('js_inventory_file')">
										<view class="table-item-title">工程量清单</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.inventory_file[0])">
											{{ item.form_data.inventory_file[0].file_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.profit_statement_file.length && fieldShowFunc('js_profit_statement_file')">
										<view class="table-item-title">利润单</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.profit_statement_file[0])">
											{{ item.form_data.profit_statement_file[0].file_name }}
										</view>
									</view>
									<view class="table-item" v-if="item.remark">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 尾款凭证 -->
							<template v-if="item.log_status == 410">
								<view class="table-content">
									<view class="table-item width-50" v-if="fieldShowFunc('wk_settlement_discount_amount')">
										<view class="table-item-title">结算优惠金额</view>
										<view class="table-item-content">
											{{ item.form_data.settlement_discount_amount ? item.form_data.settlement_discount_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('wk_final_settlement_amount')">
										<view class="table-item-title">最终结算总额</view>
										<view class="table-item-content">
											{{ item.form_data.final_settlement_amount ? item.form_data.final_settlement_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('wk_unpaid_amount')">
										<view class="table-item-title">待付尾款金额</view>
										<view class="table-item-content">
											{{ item.form_data.unpaid_amount ? item.form_data.unpaid_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('wk_amount_collected')">
										<view class="table-item-title">实付尾款金额</view>
										<view class="table-item-content">
											{{ item.form_data.amount_collected ? item.form_data.amount_collected + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('wk_final_profit_amount')">
										<view class="table-item-title">最终利润金额</view>
										<view class="table-item-content">
											{{ item.form_data.final_profit_amount ? item.form_data.final_profit_amount + '元' : '--' }}
										</view>
									</view>
									<view class="table-item width-50" v-if="fieldShowFunc('wk_settlement_completion_date')">
										<view class="table-item-title">结算完成日期</view>
										<view class="table-item-content">
											{{ item.form_data.settlement_completion_date || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('wk_warranty_deadline_date')">
										<view class="table-item-title">质保截止日期</view>
										<view class="table-item-content">
											{{ item.form_data.warranty_deadline_date || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('wk_receiving_account_name')">
										<view class="table-item-title">收款账户</view>
										<view class="table-item-content">
											{{ item.form_data.receiving_account_name || '--' }}
										</view>
									</view>
									<view class="table-item" v-if="item.form_data.payment_voucher.length && fieldShowFunc('wk_voucher_file')">
										<view class="table-item-title">付款凭证</view>
									</view>
									<view class="steps-box-data-list" v-if="item.form_data.payment_voucher.length && fieldShowFunc('voucher_file')">
										<image
											@click="preFileFunc(file)"
											v-for="(file, fileIndex) in item.form_data.payment_voucher"
											:key="fileIndex"
											class="steps-box-data-list-image"
											:src="file.file_url"
										></image>
									</view>
									<view class="table-item" v-if="item.remark && fieldShowFunc('wk_remark')">
										<view class="table-item-title">备注描述</view>
										<view class="table-item-content">{{ item.remark }}</view>
									</view>
								</view>
							</template>
							<!-- 用户评价 -->
							<template v-if="item.log_status == 430">
								<view class="table-content">
									<view class="table-item">
										<view class="table-item-title width190">工程质量满意度</view>
										<view class="table-item-content">
											<uv-rate activeColor="#F7A059" :value="item.form_data.construction_quality" readonly></uv-rate>
										</view>
									</view>
									<view class="table-item">
										<view class="table-item-title width190">工程服务满意度</view>
										<view class="table-item-content">
											<uv-rate activeColor="#F7A059" :value="item.form_data.engineering_services" readonly></uv-rate>
										</view>
									</view>
									<view class="table-item">
										<view class="table-item-title width190">监理响应满意度</view>
										<view class="table-item-content">
											<uv-rate activeColor="#F7A059" :value="item.form_data.supervision_response" readonly></uv-rate>
										</view>
									</view>
									<view class="table-item">
										<view class="table-item-title width190">向他人推荐评分</view>
										<view class="table-item-content">
											<uv-rate activeColor="#F7A059" :value="item.form_data.recommendation" readonly></uv-rate>
										</view>
									</view>
									<view class="table-item">
										<view class="table-item-title width190">客户经理服务态度</view>
										<view class="table-item-content">
											<uv-rate activeColor="#F7A059" :value="item.form_data.service_attitude" readonly></uv-rate>
										</view>
									</view>
									<view class="table-item">
										<view class="table-item-title width190">客户经理回复速度</view>
										<view class="table-item-content">
											<uv-rate activeColor="#F7A059" :value="item.form_data.reply_speed" readonly></uv-rate>
										</view>
									</view>
									<view class="table-item">
										<view class="table-item-title width190">客户经理讲解能力</view>
										<view class="table-item-content">
											<uv-rate activeColor="#F7A059" :value="item.form_data.explanatory_ability" readonly></uv-rate>
										</view>
									</view>
								</view>
							</template>
							<!-- 项目取消 -->
							<template v-if="item.log_status == 460">
								<view class="table-content">
									<view class="table-item" v-if="fieldShowFunc('cancel_type')">
										<view class="table-item-title">取消类型</view>
										<view class="table-item-content">
											<template v-if="item.form_data.cancel_type == 1">价格原因</template>
											<template v-if="item.form_data.cancel_type == 2">工期原因</template>
											<template v-if="item.form_data.cancel_type == 3">客户拒绝沟通</template>
											<template v-if="item.form_data.cancel_type == 4">客户自行施工</template>
											<template v-if="item.form_data.cancel_type == 5">不可抗力因素</template>
											<template v-if="item.form_data.cancel_type == 6">前施工问题影响</template>
											<template v-if="item.form_data.cancel_type == 7">客户关联</template>
											<template v-if="item.form_data.cancel_type == 8">其他原因</template>
										</view>
									</view>
									<view class="table-item">
										<view class="table-item-title">取消类型</view>
										<view class="table-item-content">
											{{ item.form_data.remark }}
										</view>
									</view>
									<view class="table-item" v-if="fieldShowFunc('cancel_file') && item.form_data.cancel_file.length">
										<view class="table-item-title">取消附件</view>
										<view class="table-item-file-name" @click="preFileFunc(item.form_data.cancel_file[0])">
											{{ item.form_data.cancel_file[0].file_name }}
										</view>
									</view>
								</view>
							</template>
						</view>
					</view>
				</template>
			</uv-steps-item>
		</uv-steps>
	</view>
	<!-- 文件预览 -->
	<preFileCom :fileObj="fileObj" @onFileSuccess="onFileSuccess"></preFileCom>
</template>

<script setup>
import { computed, watch, onMounted, getCurrentInstance, ref, defineEmits } from 'vue';
const { proxy: that } = getCurrentInstance();
let props = defineProps({
	logList: {
		default: () => {
			return [];
		}
	},
	field_permissions: {
		default: () => {
			return {};
		}
	}
});

// 判断是否显示
const fieldShowFunc = (field) => {
	return props.field_permissions[field] == undefined ? true : props.field_permissions[field];
};
let fileObj = ref('');
const preFileFunc = (file) => {
	console.log(file);
	fileObj.value = file;
};
const onFileSuccess = () => {
	fileObj.value = '';
};
// 是否图片
function isImageUrl(filename) {
	var imgExtensions = /\.(jpeg|jpg|gif|png|bmp)$/i;
	return imgExtensions.test(filename);
}
watch(
	() => props.logList,
	(newValue, oldValue) => {
		// console.log(newValue, oldValue, "值变化")
	}
);
// const emit = defineEmits(['close', 'onSuccess']);
// const statusText = computed(() => {

// });
</script>

<style scoped lang="scss">
.width190 {
	width: 190rpx;
}

.uv-steps-box {
	width: 100%;
	padding: 0 0 0 30rpx;
	box-sizing: border-box;

	.uv-steps-box-tips {
		width: 18rpx;
		height: 18rpx;
		background: #3b75ff;
		border-radius: 50%;
	}

	.steps-box {
		width: 624rpx;

		.steps-box-top {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.time {
				font-weight: 400;
				font-size: 26rpx;
				color: #949494;
			}

			.user-data {
				padding: 0 18rpx;
				line-height: 50rpx;
				height: 50rpx;
				background: #f9f7fa;
				border-radius: 30rpx;
				display: flex;
				align-items: center;

				.user-avater {
					width: 32rpx;
					height: 32rpx;
					background: #ffffff;
					border-radius: 50%;
					margin-right: 6rpx;
				}

				.user-name {
					font-weight: 400;
					font-size: 24rpx;
					color: #949494;
				}
			}
		}

		.steps-box-data {
			width: 100%;
			background: #f4f7fc;
			border-radius: 8rpx;
			margin-top: 16rpx;
			padding: 20rpx;
			box-sizing: border-box;

			.steps-box-data-title {
				font-weight: 500;
				font-size: 24rpx;
				color: #000000;
				// margin-bottom: 20rpx;
			}

			.steps-box-data-list {
				width: 100%;
				display: flex;
				align-items: center;
				flex-wrap: wrap;

				.table-item-file-name {
					font-weight: 400;
					line-height: 32rpx;
					color: #3b75ff;
					font-size: 24rpx;
					text-decoration: underline;
					word-break: break-all;
					margin-bottom: 20rpx;
					width: 100%;
					// overflow: hidden;
					// /* 确保溢出文本会被隐藏 */
					// white-space: nowrap;
					// /* 确保文本在一行内显示 */
					// text-overflow: ellipsis;
					// /* 使用省略号显示文本溢出 */
				}

				// margin-top: 20rpx;

				.steps-box-data-list-image {
					width: 130rpx;
					height: 130rpx;
					margin: 0 16rpx 16rpx 0;
					border-radius: 8rpx;
					position: relative;
					overflow: hidden;

					.video {
						width: 100%;
						height: 100%;
					}

					.icon-box {
						position: absolute;
						z-index: 1;
						top: 50%;
						left: 50%;
						transform: translate(-50%, -50%);
						background-color: rgba(0, 0, 0, 0.6);
						width: 60rpx;
						height: 60rpx;
						display: flex;
						align-items: center;
						justify-content: center;
						border-radius: 50%;
					}

					&:nth-child(4n) {
						margin-right: 0;
					}
				}
			}

			.table-content {
				width: 100%;
				margin-top: 20rpx;
				display: flex;
				// align-items: center;
				flex-wrap: wrap;

				.width-50 {
					width: 50% !important;
				}

				.table-item {
					width: 100%;
					display: flex;
					margin-bottom: 20rpx;
					display: flex;
					flex-wrap: wrap;

					.table-item-title {
						font-weight: 400;
						font-size: 24rpx;
						color: #828a9d;
						margin-right: 10rpx;
						line-height: 32rpx;
						white-space: nowrap;
					}

					.table-item-content {
						font-weight: 400;
						font-size: 24rpx;
						color: #1b2431;
						line-height: 32rpx;
						word-break: break-all;
					}

					.table-item-file-name {
						font-weight: 400;
						line-height: 32rpx;
						color: #3b75ff;
						font-size: 24rpx;
						text-decoration: underline;
						word-break: break-all;
						// overflow: hidden;
						// /* 确保溢出文本会被隐藏 */
						// white-space: nowrap;
						// /* 确保文本在一行内显示 */
						// text-overflow: ellipsis;
						// /* 使用省略号显示文本溢出 */
					}
				}
			}
		}
	}
}
</style>
